package com.yupi.oj.codeBox.category.impl;

import com.yupi.oj.codeBox.category.CodeBox;
import com.yupi.oj.codeBox.model.requesst.ExecuteRequest;
import com.yupi.oj.codeBox.model.response.ExecuteResponse;

import java.util.ArrayList;
import java.util.List;

/**
 * 示例代码沙箱
 *
 * @author yanghaifeng
 * @date 2024/4/23 11:05
 */
public class SampleCodeBox implements CodeBox {

    @Override
    public ExecuteResponse interior(ExecuteRequest executeRequest) {
        System.out.println("示例代码沙箱");
        ExecuteResponse response = new ExecuteResponse();
        response.setExecuteStatus("答案正确");
        List<String> executeResult = new ArrayList<>();
        executeResult.add("234");
        executeResult.add("output example");
        response.setExecuteResult(executeResult);
        response.setExecuteTime(10);
        response.setExecuteMemory(55);
        response.setErrorInfo("无");
        return response;
    }
}
